import request from "@/request/";

export const getList = (data) => {
  return request({
    url: "/api/mes-quality-service/iqc-test/statement/page",
    method: "POST",
    data,
  });
};

export const getDetail = (id) => {
  return request({
    url: "/api/mes-quality-service/iqc-test/statement/detail",
    method: "POST",
    data: {
      id,
    },
  });
};

export const getFileList = (fileIdList) => {
  return request({
    url: "/api/mes-quality-service/minio/attach/selectAttachByIdList",
    method: "POST",
    data: {
      fileIdList,
    },
  });
};

export const updateById = (data) => {
  return request({
    url: "/api/mes-quality-service/iqc-test/statement/detail/update",
    method: "POST",
    data,
  });
};

export const getRecord = (id) => {
  return request({
    url: "/api/mes-quality-service/iqc-test/audit/log/list",
    method: "POST",
    data: {
      id,
    },
  });
};

export const updateAudit = (data) => {
  return request({
    url: "/api/mes-quality-service/iqc-test/audit",
    method: "POST",
    data,
  });
};

// 导出
export const exportTableData = (data) => {
  return request({
    url: `/api/mes-warehouse-service/inv-trans/export`,
    method: "POST",
    responseType: "blob",
    timeout: 300000,
    data: data,
  });
};

// 分配
export const allocation = (data) => {
  return request({
    url: `/api/mes-quality-service/iqc-test/assign`,
    method: "POST",
    data: data,
  });
};
